#ifndef FILE_LOADER_H
#define FILE_LOADER_H

#include <string>
#include <vector>

//odczytywanie, zapisywanie, dekompresowanie pliku

class FileLoader {
    public:
        int Init();
        int LoadFile(const char* filename);
        int SaveToFile(const char* filename) const;
        int SaveBanks() const;
        
        void SetBank(int bank_id);
        int CurrentBank();
        
        unsigned char Read(unsigned int address) const;
        void Write(unsigned int address, unsigned char data);
        
        int Uncompress(char* buffer, int address, int lenght) const;
        
    private:
        
        std::vector<std::vector<unsigned char> > Bank;
        int BankCurrent;
        
        std::string Filename;
};


#endif //FILE_LOADER_R
